<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
$return=array();
/*******basic*******/
if($_RQ['op']=='basic'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		$this->plugin_setting('basic',$postdata);
		exi('设置成功');
	}
	$return['item']=$this->plugin_setting('basic');
	$htmls=array(
		'type'=>'edit',
		'desc'=>'参数设置',
		'edit_tab'=>true,
		'edits'=>array(
			array(
				'title'=>'基本信息',
				'list'=>array(
					array('type'=>'radio','title'=>'改成本价规则','name'=>'up1type','options'=>'up1types'),
					array('type'=>'unitstring','unit'=>'元','title'=>'按导入成本价加减N元','name'=>'up1jianfee','show'=>array('up1type'=>1)),
					array('type'=>'unitstring','unit'=>'%','title'=>'按导入成本价加减N%','name'=>'up1jianrate','show'=>array('up1type'=>2),'help'=>'例如填-5；表示减5%；'),
					array('type'=>'radio','title'=>'改销售价规则','name'=>'up2type','options'=>'up2types'),
					array('type'=>'unitstring','unit'=>'元','title'=>'按导入销售价加减N元','name'=>'up2jianfee','show'=>array('up2type'=>1)),
					array('type'=>'unitstring','unit'=>'%','title'=>'按导入销售价加减N%','name'=>'up2jianrate','show'=>array('up2type'=>2),'help'=>'例如填-5；表示减5%；'),
				)
			),
		),
	);
	$return['up1types']=array('按导入成本价修改','按导入成本价加减N元','按导入成本价加减%');
	$return['up2types']=array('按导入销售价修改','按导入销售价加减N元','按导入销售价加减%');
	$return['htmls']=$htmls;
	exi($return);
}
/*******basic*******/
/*******op*******/
